window: Use GList to store popover structs
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 15 Jan 2014 12:28:32 +0000 (13:28 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 22 Jan 2014 16:10:06 +0000 (17:10 +0100)
commit889a28097988ddc296a9e77de35507bfae117623
tree5a68555185c48a739824aa292d1eedb45344c16d
parent5bb259bc6ad512350d7250d782f4d9b880e30ae0
window: Use GList to store popover structs

When all popovers are removed on destroy(), if a popover is nested into
(eg. with relative_to within) another popover, the removal of one can
lead to the other being removed while the hashtable is being iterated,
which would lead to undefined behavior in further iterations.

Then, use a GList to store popovers, iterating can be made more resilient
on these situations, and unless on pathological cases there's not going
to be as many of those popovers as to cause performance decreases at the
times those are iterated.
gtk/gtkwindow.c